package cn.itsource.org.service;

import cn.itsource.basic.AjaxResult;
import cn.itsource.basic.PageList;
import cn.itsource.org.domain.Department;
import cn.itsource.org.query.DepartmentQuery;

import java.util.List;

public interface IDepartmentService {
    /**
     * 通过id查询部门
     * @param id
     * @return
     */
    Department queryOne(Long id);

    /**
     * 查询所有部门数据
     * @return
     */
    List<Department> queryAll();

    /**
     * 新增
     * @param department
     */
    void add(Department department);

    /**
     * 修改
     * @param department
     */
    void update(Department department);

    /**
     * 通过id删除数据
     * @param id
     */
    void delete(Long id);

    /**
     * 分页查询
     * @param departmentQuery
     * @return
     */
    PageList<Department> queryPage(DepartmentQuery departmentQuery);

    void patchDelete(List<Long> ids);

    List<Department> queryTree();

}
